package com.huangsm.concurrence.blockingqueue;

import lombok.AllArgsConstructor;

import java.util.concurrent.BlockingQueue;

/**
 * @author huang
 * @PACKAGE_NAME com.huangsm.concurrence.blocking
 * @PROJECT_NAME concurrence
 * @date 2019/2/14
 */
@AllArgsConstructor
public class Cousumer implements Runnable {
    protected BlockingQueue queue = null;
    @Override
    public void run() {
        try {
            System.out.println(queue.take());
            System.out.println(queue.take());
            System.out.println(queue.take());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
